<{include file="home/head.tpl"}>
	 <div class="content_buss">
		<div class="logoin_title">
			<div class="loginimg"><img src="../public/img/logoin-img.jpg"/></div>
			<div class="login-text">&nbsp;&nbsp;会员注册 <i>User Login</i></div>
		</div>
		<div class="login-content">
			<div class="login-left">
				<table>
					<tr>
						<td>用 户 名：</td>
						<td>
							<input name="user_name" type="text" id="user_name"  size="35" class="iptxt" />
						</td>
					</tr>
					<tr>
						<td>密　　码：</td>
						<td>
							<input name="pwd" type="password" id="pwd"  size="35" class="iptxt" />
						</td>
					</tr>
					<tr>
						<td>确认密码：</td>
						<td>
							<input name="pwd2" type="password" id="pwd2"  size="35" class="iptxt" />
						</td>
					</tr>
					<tr>
						<td>手 机 号：</td>
						<td>
							<input name="user_phone" type="text" id="user_phone" size="35" class="iptxt" />
						</td>
					</tr>
					<tr>
						<td>验 证 码：</td>
						<td>						
							<div class="checkbox_data"><input name="check_code" type="text"  size="4" class="iptxt" /></div>
							<div class="checkbox_img" >&nbsp;&nbsp;&nbsp;&nbsp;<img class="checkimg" src="checkcode.php" title="看不清，换一张" />&nbsp;&nbsp;&nbsp;&nbsp;</div>
							<div class="checkbox_exchange checkimg">换一张</div>
						</td>
					</tr>
					<tr>
						<td >&nbsp;</td>
						<td>						
							<div class="checkbox_data"><input name="protocol" checked="checked" type="checkbox" class="iptxt_checkbox" /></div>						
							<div class="checkbox_exchange"><span class="agree">同意：</span>旅游伴侣网站用户注册协议</div>
						</td>
					</tr>
					<tr>
						<td style="height:40px;" colspan="2">
							<div class="login-button">注 册</div>							
						</td>
					</tr>
				</table>
			</div>
			<div class="login-right">
				<div class="login-right-title">有用户名吗</div>
				<div class="region-button"><a href="loginu.php" target="_self">登 录</a></div>
				<img src="../public/img/boat.png">
			</div>
		</div>
	</div>
<{include file="home/foot.tpl"}>
<script>
$(function(){
	 $("#user_name").onblur(function(){
alert(5)
		 check_name();
	 });

	 $(".checkimg").click(function(){
		$(".checkimg").attr('src','checkcode.php?id='+ Math.random())
	})
})

fucntion check_name(){
	var name = $("#user_name").val();
	
		$.post(
			'sign_up.php',
			{act:'check_name',name:name},
			function(cb){
				if(cb > 0){
					alert('用户名已被占用！');
				}
			},
			'html'
		)
	
}
</script>


